package sbc.group1.lab1.common;


public class Engine extends Part  {

    public enum Type {
        T80KW,
        T100KW,
        T160KW;
    }
    private final Type type;
    
    @Deprecated
    public Engine(Producer producer, Type type) {
        super(producer);
        this.type=type;
    }
    
	public Engine(Producer producer, Type type, boolean isDefect) {
		super(producer, isDefect);
		this.type=type;
	}
	
	public Type getType() {
	    return type;
	}
	
    @Override
    public String toString() {
        String str=super.toString();
        return str.substring(0,str.length()-1)+", type="+ 
        (type == null ? "null" : type.toString())+"]";
    }

}
